/**
 * 视频合集相关接口
 */
import request from '@/config/request'
import type {
  CvVideoCollectionDetailPageReqVO,
  CvVideoCollectionPageReqVO,
  CvVideoCollectionSaveReqVO
} from '@/types/collection'

/**
 * 新增视频合集
 */
export const createCollection = (data: CvVideoCollectionSaveReqVO) => {
  return request.post({ url: '/platform/video/collection/create', data })
}

/**
 * 修改视频合集
 */
export const updateCollection = (data: CvVideoCollectionSaveReqVO) => {
  return request.put({ url: '/platform/video/collection/update', data })
}

/**
 * 删除视频合集
 */
export const deleteCollection = (id: number) => {
  return request.delete({ url: '/platform/video/collection/delete', params: { id } })
}

/**
 * 分页查询视频合集
 */
export const getCollectionPage = (reqVO: CvVideoCollectionPageReqVO) => {
  return request.get({ url: '/platform/video/collection/page', params: reqVO })
}

/**
 * 获取视频合集详情
 */
export const getCollection = (reqVO: CvVideoCollectionDetailPageReqVO) => {
  return request.get({ url: '/platform/video/collection/detail', params: reqVO })
}
